#!/bin/bash
function pid_check(){
    pid=$1
    if kill -0 ${pid} >/dev/null 2>&1; then
        echo "1"
    else
        echo "0"
    fi
}
pid_check $1